import {request} from "../../request";


export function getCodelistById(id){
    return request({
        url:`/lswms/codelist/${id}`,
        // url:'/demo/warehouse/page',
        method:'get'
    })
}


export function getCodelistList(data){
    return request({
        url:'/lswms/codelist/page',
        method:'put',
        data:data
    })
}

export function putCodelist(data){
    return request({
        url:'/lswms/codelist',
        method:'put',
        data:data
    })
}
export function postCodelist(data){
    return request({
        url:'/lswms/codelist',
        method:'post',
        data:data
    })
}

export function deleteCodelist(data){
    return request({
        url:`/lswms/codelist`,
        method:'delete',
        data:data
    })
}
export function exportCode(data){
    return request({
        url:`/lswms/codelist/export`,
        method:'get',
        data:data,
        responseType:'blob'
    })
}
export function getCodeListByCode(data){
    return request({
        url:`/lswms/codelist/Code`,
        method:'get',
        params:{'code': data }
    })
}